
clear

cd "C:\code"

import delimited dataset_bordersDIFF100nb.txt, delimiters(tab) clear

*label variables
label variable deaths_per_capita "Deaths Per Capita"
*label variable weekly_incr_deaths_per_capita "Weekly Change in Deaths Per Capita"
label variable stayhome "Stay at Home"
label variable emergency "State of Emergency"
label variable nursingmustaccept "Nursing Accept Pos."
label variable novisit "No Nursing Visits"
*label variable schoolshut "Schools Closed"
label variable employeemask "Employees Masks"
label variable maskrec "Masks Recommended"
label variable maskmandatory "Mandatory Masks"
label variable parksclosed "Beaches or Parks Closed"
label variable openreverse "Re-openings Reversed"
label variable noelective "No Elective Procedures"
label variable restclosed "Restaurants Closed"
label variable barsclosed "Bars Closed"
label variable gymsclosed "Gyms Closed"
label variable spasclosed "Spas Closed"
label variable gathermax10 "Gatherings Limited to 10"
label variable gathermax100 "No Gatherings Over 100"
label variable gathermax100plus "No Gatherings Limit>100"
label variable medriskclose "Med. Risk Bus. Closed"
label variable highriskclose "High Risk Bus. Closed"
label variable higherriskclose "Higher Risk Bus. Closed"
label variable highestriskclose "Highest Risk Bus. Closed"
label variable percapincome "Per Capita Income"
label variable popdensity "Population Density"
label variable obese "Obesity"
label variable smoke "Smokers"
label variable housingdensity "Housing Density"
label variable t_first "Days Since First Case"
label variable deaths7_growth "Growth{\sub t+1}"
label variable deaths14_growth "Growth{\sub t+2}"
label variable deaths21_growth "Growth{\sub t+3}"
label variable deaths28_growth "Growth{\sub t+4}"
label variable deaths35_growth "Growth{\sub t+5}"
label variable deaths42_growth "Growth{\sub t+6}"
label variable deaths7_lgrowth "Growth{\sub t-1}"
label variable deaths14_lgrowth "Growth{\sub t-2}"
label variable deaths21_lgrowth "Growth{\sub t-3}"
label variable deaths28_lgrowth "Growth{\sub t-4}"
label variable deaths35_lgrowth "Growth{\sub t-5}"
label variable deaths42_lgrowth "Growth{\sub t-6}"
label variable deaths7_per_cap_lag "Deaths Per Cap{\sub t-1}"
label variable deaths14_per_cap_lag "Deaths Per Cap{\sub t-2}"
label variable deaths21_per_cap_lag "Deaths Per Cap{\sub t-3}"
label variable deaths28_per_cap_lag "Deaths Per Cap{\sub t-4}"
label variable deaths35_per_cap_lag "Deaths Per Cap{\sub t-5}"
label variable deaths42_per_cap_lag "Deaths Per Cap{\sub t-6}"
label variable t "Days Since March 1"
label variable avgtemp "Avg Temperature"
label variable hothumidweekdays "Hot Humid Weekdays"
label variable nursetotpop "Nursing Home Pop."
label variable hothumidweekend "Hot Humid Weekend"
label variable coldweekday "Cold Weekdays"
label variable coldweekend "Cold Weekend"
label variable age65plus "Age 65+"
label variable age85plus "Age 85+"
label variable asian "Asian"
label variable black "Black"
label variable hispanic "Hispanic"
label variable nativeamer "Native Americans"
label variable other "Other"

gen date1 = date(date, "DM20Y") 
format date1 %td
drop if date1 > mdy(12,31,2020)
drop if date1 < mdy(3,1,2020)

drop if missing(deaths42_lgrowth)


*table A.5 (main) 

reg deaths7_growth deaths_per_capita deaths7_lgrowth deaths14_lgrowth deaths21_lgrowth deaths28_lgrowth deaths35_lgrowth deaths42_lgrowth t_first t  avgtemp hothumidweekdays hothumidweekend coldweekday coldweekend age65plus age85plus asian black hispanic nativeamer other percapincome  popdensity diabetes obese smoke housingdensity nursetotpop stayhome emergency nursingmustaccept novisit  employeemask  maskrec maskmandatory parksclosed openreverse noelective restclosed barsclosed gymsclosed spasclosed  gathermax10 gathermax100 gathermax100plus medriskclose highriskclose higherriskclose highestriskclose b_stayhome b_emergency b_nursingmustaccept b_novisit b_employeemask b_maskrec b_maskmandatory b_parksclosed b_openreverse b_noelective b_restclosed b_barsclosed b_gymsclosed b_spasclosed   b_gathermax10 b_gathermax100 b_gathermax100plus b_medriskclose b_highriskclose b_higherriskclose b_highestriskclose wks_stayhome wks_emergency wks_nursingmustaccept wks_novisit wks_employeemask wks_maskrec wks_maskmandatory wks_parksclosed wks_openreverse wks_noelective wks_restclosed wks_barsclosed wks_gymsclosed wks_spasclosed wks_gathermax10 wks_gathermax100 wks_gathermax100plus wks_medriskclose wks_highriskclose wks_higherriskclose wks_highestriskclose log_wks_stayhome log_wks_emergency log_wks_nursingmustaccept log_wks_novisit log_wks_employeemask log_wks_maskrec log_wks_maskmandatory log_wks_parksclosed log_wks_openrevers log_wks_noelective log_wks_restclosed log_wks_barsclosed log_wks_gymsclosed log_wks_spasclosed log_wks_gathermax10 log_wks_gathermax100 log_wks_gathermax100plus log_wks_medriskclose log_wks_highriskclose log_wks_higherriskclose log_wks_highestriskclose b_wks_stayhome b_wks_emergency b_wks_nursingmustaccept b_wks_novisit b_wks_employeemask b_wks_maskrec b_wks_maskmandatory b_wks_parksclosed b_wks_openreverse b_wks_noelective b_wks_restclosed b_wks_barsclosed b_wks_gymsclosed b_wks_spasclosed b_wks_gathermax10 b_wks_gathermax100 b_wks_gathermax100plus b_wks_medriskclose b_wks_highriskclose b_wks_higherriskclose b_wks_highestriskclose b_log_wks_stayhome b_log_wks_emergency b_log_wks_nursingmustaccept b_log_wks_novisit b_log_wks_employeemask b_log_wks_maskrec b_log_wks_maskmandatory b_log_wks_parksclosed b_log_wks_openreverse b_log_wks_noelective b_log_wks_restclosed b_log_wks_barsclosed b_log_wks_gymsclosed b_log_wks_spasclosed b_log_wks_gathermax10 b_log_wks_gathermax100 b_log_wks_gathermax100plus b_log_wks_medriskclose b_log_wks_highriskclose b_log_wks_higherriskclose b_log_wks_highestriskclose, vce(cluster countyfips) 

outreg2 using "C:\code\output\tableA5.doc", replace stats(coef se) drop(deaths7_growth deaths14_growth deaths28_growth deaths42_growth deaths21_growth deaths35_growth) adjr2 dec(3) label nonotes title(Table A5) sideway noparen 